package com.community.service.impl;

import com.alibaba.druid.sql.PagerUtils;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.community.dto.PurchaseOrderDto;
import com.community.dto.SupplierProductDto;
import com.community.pojo.Product;
import com.community.pojo.SupplierProduct;
import com.community.mapper.SupplierProductMapper;
import com.community.service.ISupplierProductService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.community.utils.PageUtils;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 供货商商品关联表 服务实现类
 * </p>
 *
 * @author TangHaoSong Fly ChenJie HeYuHang
 * @since 2024-05-15
 */
@Service
public class SupplierProductServiceImpl extends ServiceImpl<SupplierProductMapper, SupplierProduct> implements ISupplierProductService {

    @Autowired
    private SupplierProductMapper supplierProductMapper;

    @Override
    public List<SupplierProductDto> searchSupplier(int productId){

        List<SupplierProductDto> list=this.supplierProductMapper.querySupplier(productId);

        return list;
    }

    @Override
    public List<PurchaseOrderDto> searchPurchase(int id){
        List<PurchaseOrderDto> list=this.supplierProductMapper.searchProduct(id);

        return list;
    }
}
